import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)
const CouTable = r => require.ensure([], () => r(require('@/page/CouTable.vue')), 'CouTable');
const StuAndCou = r => require.ensure([], () => r(require('@/page/StuAndCou.vue')), 'StuAndCou');
const addStu = r => require.ensure([], () => r(require('@/page/addStu.vue')), 'addStu');
const baiduMap = r => require.ensure([], () => r(require('@/components/baiduMap.vue')), 'baiduMap');
const baiduMap2 = r => require.ensure([], () => r(require('@/components/baiduMap2.vue')), 'baiduMap2');
const Home = r => require.ensure([], () => r(require('@/components/Home.vue')), 'Home');
const addInfoFrom = r => require.ensure([], () => r(require('@/components/addInfoFrom.vue')), 'addInfoFrom');
const editMap = r => require.ensure([], () => r(require('@/components/editMap.vue')), 'editMap');

const routes = [
 {
    path: '/',
    redirect: '/baiduMap2'
  },
	{
		path: '/baiduMap2',
    name:'baiduMap2',
		component: baiduMap2,
	},
  {
    path: '/couTable',
    name:'CouTable',
    component: CouTable,
  },
  {
    path: '/stuAndCou',
    name:'StuAndCou',
    component: StuAndCou,
  },
  {
    path: '/addStu',
    name:'addStu',
    component: addStu
  },
  {
    path: '/baiduMap',
    name:'baiduMap',
    component: baiduMap
  },
  {
    path: '/Home',
    name:'Home',
    component: Home
  },
  {
    path: '/addInfoFrom',
    name:'addInfoFrom',
    component: addInfoFrom
  },
  {
    path: '/editMap',
    name:'editMap',
    component: editMap
  },


]

const router=new Router({
  mode:"history",  //去掉地址栏#
	routes,
	strict: process.env.NODE_ENV !== 'production',
})



export default router
